﻿using Microsoft.AspNetCore.Mvc;
using System.Linq;

namespace brand.admin.cyt369.com.Areas.BrandAdmin.Controllers
{
    public partial class CityController 
    {
        /// <summary>
        /// 获取所有城市
        /// </summary>
        /// <returns></returns>
        public IActionResult GetCitys()
        {
            var citys=brand.admin.cyt369.com.services.Services.CityService.Instance.GetCitys();
            return DefaultJson(citys);
        }

        /// <summary>
        /// 获取城市通过ID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult GetCityByID(int id)
        {
            var city = brand.admin.cyt369.com.services.Services.CityService.Instance.GetCityByID(id);
            return DefaultJson(city);
        }
    }
}
